﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tile_Editor
{
    public partial class Event : Form
    {
        public event ApplyEventHandler Apply;
        public Event()
        {
            InitializeComponent();
        }
        public string TriggerEvent
        {
            get { return Action.Text; }
            set { Action.Text = value; }
        }
        private void btn_apply_Click(object sender, EventArgs e)
        {
            if (Apply != null)
            {
                Apply(this, new ApplyEventArgs(Action.Text));
            }
        }
    }
    public delegate void ApplyEventHandler(object sender, ApplyEventArgs e);
    public class ApplyEventArgs : EventArgs
    {
        string triggerevent;

        public string Triggerevent
        {
            get { return triggerevent; }
            set { triggerevent = value; }
        }
        public ApplyEventArgs(string tevent)
        {
            this.Triggerevent = tevent;
        }
    }
}
